	<?php 
	if(!empty($this->Items)):
		$config 		= new Zendvn_Controller_Config(array('module'=>'admin',
															'fileConfig'=>'product-category.ini'));
		$itemConfig 	= $config->getconfig('item');
		$i = 0;
		$filter = new Zendvn_Filter_Filter();
		
		$xhtml = '';
		
		foreach ($this->Items as $k => $v){
			$flagEnd 	= true;
			$id			= $v['id'];
			$name 		= Zendvn_Filter_Filter::filterContent($v['name'], 'filter');
			$picture 	= $v['image'];
			$no_price	= $v['no_price'];
			if(file_exists($itemConfig['uploadDir'] . '/' . $picture) && !empty($picture)){
				$picture = $itemConfig['uploadUrl'] . '/' . $picture;
			}else{
				$picture = FILE_URL . '/no-image.png';
			}
			
			$price 		= $v['price'];
			$sell_off	= $v['sale_price'];
			$newPrice 	= (empty($sell_off) || $sell_off == 0)?$price:$sell_off;
			$newPrice	= ($no_price == 1)?'Call':number_format($newPrice);
			
			$linkDetail = $this->cmsUrl(array(
											'module' => 'default',
											'controller' => 'index',
											'action' => 'product-detail',
											'id' => $id,
											'title' => $filter->filter($name)
											), 'product-detail');
			$i++;
			$class = '';
			if($i == 3){
				$class = ' last-item';
				$i = 0;
			}
			$xhtml .= '<div class="product-item' . $class . '">
							<div class="thumb">
								<a href="' . $linkDetail . '" title="' . $name . '">
									<img class="product-thumb" src="' . BLANK_IMG . '" style="background: #fff url(' . $picture . ') center center no-repeat; background-size:100%" width="300" height="300" />
								</a>
							</div>  
							<div class="title">
						        <h2><a href="' . $linkDetail . '" title="' . $name . '">' . $name . '</a></h2>
						        <span class="sell-price">' . $newPrice . '<sup>đ</sup></span>
						        <!--<span class="original-price">' . $price . '<sup>đ</sup></span>-->
						        <a href="#" class="view"></a>
						    </div> 
						</div>';
			
			
		}
		$xhtml .= '<div class="clr"></div>';
		echo $xhtml;
	endif;
	?>
